n=input()
if n == 1:
    print -1
elif n == 2:
    print -1
elif n == 3:
    print '210'
elif (n-4)% 6 == 0:
    print '1'+'0'*(n-4)+'050'
elif (n-4)% 6 == 1:
    print '1'+'0'*(n-4)+'080'
elif (n-4)% 6 == 2:
    print '1'+'0'*(n-4)+'170'
elif (n-4)% 6 == 3:
    print '1'+'0'*(n-4)+'020'
elif (n-4)% 6 == 4:
    print '1'+'0'*(n-4)+'200'
elif (n-4)% 6 == 5:
    print '1'+'0'*(n-4)+'110'
